# -*- coding:utf-8 -*-


data_directory = "./screenshots"

phone = "iphone"

### 1代表灰度处理， 2代表二值化处理，如果需要使用二值化，需要将2放到前面, 0不使用
image_compress_level = (1, 0, 2)

### 0 表示普通识别，配合compress_level 1使用
### 1 标识精确识别，精确识别建议配合image_compress_level 2使用
api_version = (0, 1)

## 图像比例裁剪区域, (left, top, right, bottom)
## 最终裁剪区域可表示为 (image_width * left, image_height * top, image_width * right, image_height * bottom)
crop_areas = {
    '百万英雄': (55/1080, 220/1920, 1025/1080, 1260/1920),
    '冲顶大会': (40/750, 250/1334, 710/750, 865/1334)
}

qtw = 31 / 317
qth = 137 / 565
qbw = 290 / 317
qbh = 193 / 565
atw = 43 / 317
ath = 218 / 565
abw = 292 / 317
abh = 360 / 565
### 本地ocr查询，需要处理图像 对答案和文字分别提取出来
# uw = 305
# uh = 543
# uqtw = 26 / uw
# uqth = 115 / uh
# uqbw = 285/ uw
# uqbh = 154/ uh
#
# uatw1 = 38 / uw
# uath1 = 191 / uh
# uabw1 = 264/ uw
# uabh1 = 220 / uh
#
# uatw2 = 36 / uw
# uath2 =254 / uh
# uabw2=268 / uw
# uabh2 = 280 / uh
#
# uatw3 = 38 / uw
# uath3 = 314 / uh
# uabw3 = 263 / uw
# uabh3 = 340 / uh
uw = 339
uh = 604
uqtw = 60 / uw
uqth = 101 / uh
uqbw = 283/ uw
uqbh = 148/ uh

uatw1 = 71 / uw
uath1 = 173 / uh
uabw1 = 267/ uw
uabh1 = 199 / uh

uatw2 = 69 / uw
uath2 =225 / uh
uabw2=266 / uw
uabh2 = 250 / uh

uatw3 = 68 / uw
uath3 = 276 / uh
uabw3 = 272 / uw
uabh3 = 302 / uh
ocr_crop_areas = {
    '百万英雄': (55/1080, 220/1920, 1025/1080, 1260/1920),
    '冲顶大会': (qtw, qth, qbw, qbh, atw, ath, abw, abh),
    'uc': (uqtw,uqth,uqbw,uqbh,  uatw1,uath1,uabw1,uabh1,   uatw2,uath2,uabw2,uabh2,  uatw3,uath3,uabw3,uabh3)
}

### baidu orc
app_id = "10661627"
app_key = "h5xcL0m4TB8fiiFWoysn7uxt"
app_secret = "HGA1cgXzz80douKQUpII7K77TYWSGcfW"

### ocr.space
api_key = "6c851da45688957"

### 默认使用百度，每天封顶500次
### 如果你想要使用ocr.space的话，将ocrspace移动到前面,每个api_key每月支持25000次调用
prefer = ('tesseract', "baidu",  "ocrspace")

### enable chrome
enable_chrome = True
